using System.Collections.Generic;

namespace Calais.RDFSProcess
{
    /// <summary>
    /// The basic construct for a CalaisInterface
    /// </summary>
    public class CalaisInterface
    {
        public Dictionary<string, string> Properties = new Dictionary<string, string>();
        public List<string> AdditionalInterfaces = new List<string>();

        #region Constructors
        public CalaisInterface() { }
        public CalaisInterface(string name)
        {
            Name = name;
        }
        #endregion

        public string Name { get; set; }
        public string CalaisType { get; set; }
        public string CalaisDescription { get; set; }
        public bool IsCustomType { get; set; }

        public bool IsPropertyAdded(string name)
        {
            return Properties.ContainsKey(name);
        }

        public bool IsAdditionalInterfaceAdded(string interfaceName)
        {
            return AdditionalInterfaces.Contains(interfaceName);
        }

        public void AddProperty(string name, string type)
        {
            if (!IsPropertyAdded(name))
            {
                Properties.Add(name, type);
            }
        }

        public void AddAdditionalInterface(string interfaceName)
        {
            if (!IsAdditionalInterfaceAdded(interfaceName))
            {
                AdditionalInterfaces.Add(interfaceName);
            }
        }
    }
}